package com.itheima;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class ConditionApplication {

    public static void main(String[] args) {
        //启动SpringBoot应用,返回Spring的IOC容器
        ConfigurableApplicationContext context = SpringApplication.run(ConditionApplication.class, args);

        //获取bean
       /* Object redisTemplate = context.getBean("redisTemplate");
        System.out.println(redisTemplate);*/

        Object user2 = context.getBean("user2");
        System.out.println(user2);
    }

}
